package com.guiji.text2video.system.api;

import com.guiji.text2video.common.core.constant.ServiceNameConstants;
import com.guiji.text2video.system.api.domain.SysTts;
import com.guiji.text2video.system.api.factory.RemoteAIBaseFallbackFactory;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * AIBase微服务，包含视频合成服务和tts服务
 *
 * @author 钟维澎（四月）
 */
@FeignClient(contextId = "remoteAIBaseService", value = ServiceNameConstants.VIDEO_SYNTHESIS_SERVICE, fallbackFactory = RemoteAIBaseFallbackFactory.class)
public interface RemoteAIBaseService {

    /*
     * 合成视频任务接口
     *
     * @param sysVideo 合成视频的请求的json串
     * @return 结果
     * */
    @PostMapping(value = "/call/358", consumes = MediaType.APPLICATION_JSON_VALUE)
    Response video(@RequestBody String video);

    /*
     * 合成语音任务接口
     *
     * @param sysTts
     * @return 结果
     * */
    @PostMapping(value = "/call/359", consumes = MediaType.APPLICATION_JSON_VALUE)
    Response tts(@RequestBody SysTts sysTts);
}
